import { defHttp } from '/@/utils/http/axios'
import { MachineInfo } from './model/machine'

import { ErrorMessageMode } from '/#/axios'

enum Api {
  List = '/machineInfo/machineInfo/list',
}

/**
 * @description: 获取机器列表
 */
export function ListApi(mode: ErrorMessageMode = 'modal') {
  return defHttp.get<Array<MachineInfo>>(
    {
      url: Api.List,
    },
    {
      errorMessageMode: mode,
    },
  )
}

